import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // username: user.cname,
    custkey:null,
    user:''
  },
  getters: {
  },
  mutations: {
    setUsername(state, username) {
      state.username = username;
    },
    setUserid(state,custkey){
      state.custkey = custkey
    },
    logout(){
      localStorage.removeItem("user")
      router.push('/')
      resetRouter()
  }
  },
  actions: {
  },
  modules: {
  }
})
